<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Login Page | Amaze UI Example</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="alternate icon" type="image/png" href="/vendor/amazeui/assets/i/favicon.png">
    <link rel="stylesheet" href="/vendor/amazeui/css/amazeui.min.css"/>
    <style>
        .header {
            text-align: center;
        }

        .header h1 {
            font-size: 200%;
            color: #333;
            margin-top: 30px;
        }

        .header p {
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="header">
    <div class="am-g">
        <h1>小卖部系统</h1>
        <p>Integrated Development Environment<br/>代码编辑，代码生成，界面设计，调试，编译</p>
    </div>
    <hr/>
</div>
<div class="am-g">
    <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
        <hr>
        <form method="post" class="am-form" action="{{ route('login') }}">
            {{ csrf_field() }}

            <div class="am-form-group {{ $errors->has('name') ? ' am-form-error' : '' }} am-form-icon am-form-feedback">
                @if ($errors->has('name'))
                    <label class="am-form-label" for="doc-ipt-error">{{ $errors->first('name') }}</label>
                @else
                    <label class="am-form-label">用户名：</label>
                @endif

                <input type="text" id="doc-ipt-success" class="am-form-field" name="name" placeholder="请输入用户名"
                       value="{{ old('name') }}" required autofocus>
                @if ($errors->has('name'))
                    <span class="am-icon-times"></span>
                @endif
            </div>

            <div class="am-form-group {{ $errors->has('password') ? ' am-form-error' : '' }} am-form-icon am-form-feedback">
                @if ($errors->has('password'))
                    <label class="am-form-label" for="doc-ipt-error">{{ $errors->first('password') }}</label>
                @else
                    <label class="am-form-label">密码：</label>
                @endif

                <input type="password" id="doc-ipt-success" class="am-form-field" name="password" placeholder="请输入密码"
                       required>
                @if ($errors->has('password'))
                    <span class="am-icon-times"></span>
                @endif
            </div>


            <div class="am-form-group {{ $errors->has('captcha') ? ' am-form-error' : '' }} am-form-icon am-form-feedback" >
                @if ($errors->has('captcha'))
                    <label class="am-form-label" for="doc-ipt-error">{{ $errors->first('captcha') }}</label>
                @else
                    <label class="am-form-label">验证码：</label>
                @endif

                <div class="am-g doc-am-g">
                    <div class="am-u-sm-9">
                        <input type="text" id="doc-ipt-success" class="am-form-field" name="captcha"
                               placeholder="请输入验证码" required>
                    </div>
                    <div class="am-u-sm-3">
                        <img src="{{captcha_src()}}" alt="" style="cursor:pointer" onclick="this.src='{{captcha_src()}}?'+Math.random()">
                    </div>
                </div>

                @if ($errors->has('captcha'))
                    <span class="am-icon-times"></span>
                @endif


            </div>


            <label for="remember-me">
                <input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}>
                记住密码
            </label>
            <br/>
            <div class="am-cf">
                <div class="am-u-sm-9">
                    <input type="submit" name="" value="登 录" class="am-btn am-btn-primary am-btn-sm am-fl">
                </div>
                <div class="am-u-sm-2">
                    <a href="{{ route('register') }}" >注册</a>
                </div>
            </div>
            <a href="{{ route('password.request') }}" class="am-btn am-btn-default am-btn-sm am-fr"> 忘记密码 ^_^? </a>
        </form>
        <hr>
        <p>© Copyright 2013-2017 长乐未央公司版权所有</p>
    </div>
</div>
</body>
</html>